
<?php include 'header.php';?>

    <!--其他区域-->
    <section>
		<div class="input-search">
            <input type="text" placeholder="search..." class="button mcolor" style="padding:0;padding-right:15%;" id="search">
            <div class="back-icon"><i id="search-icon" class="icon iconfont icon-search" onclick="gosearch()"></i></div>
            <div style="margin-top:10px;">
                <?php
                    foreach( $hot_search as $key => $val ){
                        echo '<a href="/search?content='.$val.'"><span class="label bg-mcolor">'.$val.'</span></a>';
                    }
                ?>
            </div>
        </div>
        <p style="padding-left:20px;color:#9a9a9a">热门图书</p>
        <hr>
        <?php
            foreach( $hot_books as $key1 => $val1 ){
                echo '<a href="/detail?href='.$val1['href'].'" class="block item">';
                echo '    <img src="'.$val1['image'].'">';
                echo '    <h3>'.$val1['name'].'</h3>';
                echo '    <div style="word-wrap:break-word;word-break:break-all;">';
                echo '        <span style="font-size:14px;" class="mcolor">摘要：</span>';
                if( $val1['brief'] == '' ){
                    echo $val1['author'].'<br />';
                    echo $val1['press'];
                }else{
                    echo $val1['brief'];
                }
                echo '    </div>';
                echo '</a>';
            }
        ?>

    </section>
<?php include 'footer.php';?>
<script type="text/javascript">
    $("#user-center").show();
    $("#user-center").css("right","20px !important");
    // 搜索
    function gosearch(){
        if ($("#search").val()=='') {
            toast("搜索内容不能为空！");
        }else{
            location.href="/search?content="+encodeURIComponent($("#search").val());
        };
    }

    function isRootPage(){
        return true;
    }
</script>
